package com.yzy.fly.entity.role;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@TableName(value = "fly_model_widget", autoResultMap = true)
public class FlyModelWidget implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer seq;
    private String name;
    @TableField("`key`")
    private Integer key;
    private String category;
    private String type;
    private String icon;
    private boolean formItemFlag;
    private boolean internal;
    private boolean merged;
    @TableField(value = "options",typeHandler = FastjsonTypeHandler.class)
    private JSONObject options;

//    @TableField(exist = false)
//    private List<FlyViewWidget> tabs;
//    @TableField(exist = false)
//    private List<FlyViewWidget> widgetList;
//
//    @TableField(exist = false)
//    private List<FlyViewWidget> rows;
//    @TableField(exist = false)
//    private List<FlyViewWidget> cols;
    @TableField(exist = false)
    private List<FlyModelWidget> childrens;

    @TableField(exist = false)
    private List<FlyAttributeWidget> attrs;
    @TableField(exist = false)
    private Integer parentId;
//    private Integer attrId;
    private Integer modelId;
    private Integer defModelId;
    private Integer systemId;
    private Integer viewId;
    private Date createTime;

    private Date updateTime;


}
